package examples;

import org.metaworks.ContextAware;
import org.metaworks.MetaworksContext;
import org.metaworks.annotation.AutowiredFromClient;
import org.metaworks.annotation.Face;
import org.metaworks.annotation.Id;
import org.metaworks.annotation.Name;
import org.metaworks.annotation.NonEditable;
import org.metaworks.annotation.ServiceMethod;

public class Person {

    String name;
    @Id
	@Name
		public String getName() {
			return name;
		}
		public void setName(String name) {
			this.name = name;
		}	
		
	int age;
		public int getAge() {
			return age;
		}
		public void setAge(int age) {
			this.age = age;
		}
	
	String message;
	@NonEditable
		public String getMessage() {
			return message;
		}
		public void setMessage(String message) {
			this.message = message;
		}

	@ServiceMethod(callByContent=true)
	public void sayHappyNewYear() throws InterruptedException{
		age = age + 1;
		setMessage("Happy New Year, " + getName() + ". and your age is  " + age);
	}
		
}